#-------------------------------------------------
#
# Project created by QtCreator 2024-06-05T09:35:21
#
#-------------------------------------------------

QT += core gui sql dbus

TARGET = devcommon
TEMPLATE = lib

CONFIG += create_pc create_prl no_install_prl

DEFINES += DEVCOMMON_LIBRARY

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
        devcommon.cpp \
    interface/moduleinterface.cpp \
    common.cpp \
    hconcurrent.cpp \
    invokers/invokerfactory.cpp \
    invokers/deepindefendersettingsInvoker.cpp \
    invokers/dbusinvoker.cpp \
    antivirus/antiviruswork.cpp \
    widgets/dialogmanage.cpp \
    widgets/ddialog.cpp \
    widgets/dspinner.cpp \
    csingleteon.cpp \
    dtrashmanager.cpp \
    widgets/dlistviewmulticol/dlistviewmulticolframe.cpp \
    widgets/dlistviewmulticol/dlistviewmulticoldelegate.cpp \
    widgets/dlistviewmulticol/dlistviewmulticol.cpp \
    widgets/searchlineedit/searchlineedit.cpp \
    widgets/searchlineedit/animatedlineedit.cpp \
    widgets/avcpulimitation.cpp \
    widgets/basiclistdelegate.cpp \
    widgets/basiclistmodel.cpp \
    widgets/custompushbutton.cpp \
    widgets/dccslider.cpp \
    widgets/dccsliderannotated.cpp \
    widgets/defendertable.cpp \
    widgets/defendertableheaderview.cpp \
#    widgets/fixitemwindow.cpp \
    widgets/hframe1.cpp \
    widgets/menuitem.cpp \
    widgets/multicombox.cpp \
    widgets/multiselectlistview.cpp \
    widgets/passwordedit.cpp \
    widgets/safetyprotectionitem.cpp \
    widgets/scansize.cpp \
    widgets/scorebar.cpp \
    widgets/scoreprogressbar.cpp \
    widgets/securitylevelitem.cpp \
    widgets/selectediconwidget.cpp \
    widgets/settingsgroup.cpp \
    widgets/settingsheaderitem.cpp \
    widgets/settingsitem.cpp \
    widgets/switchwidget.cpp \
    widgets/tipwidget.cpp \
    widgets/titlebuttonitem.cpp \
    widgets/titledslideritem.cpp \
    widgets/titlelabel.cpp \
    widgets/translucentframe.cpp \
    widgets/updateaddressitem.cpp \
    widgets/usbstorageitemrefreshmodel.cpp \
    widgets/viruswhitelistscan.cpp \
    dversionnumber.cpp \
    widgets/dstyleoption.cpp \
    gui/kernel/dpalette.cpp \
    widgets/dlineedit.cpp \
    widgets/dalertcontrol.cpp \
    widgets/hswitchbutton.cpp \
    widgets/hfloatingdialog.cpp \
    widgets/hiconlistview.cpp \
    widgets/hiconitemview.cpp \
    widgets/hlistviewdelegate.cpp \
    widgets/dcommandlinkbutton.cpp \
    interface/modulesfactory.cpp \
    widgets/hfloatingmessage.cpp \
    util/dpinyin.cpp \
    antivirus/customfiledialog.cpp \
    antivirus/natiavisolationdilog.cpp \
    antivirus/natiavparentwidget.cpp \
    antivirus/natiavscanlog.cpp \
    antivirus/natiavtrustdialog.cpp \
    antivirus/natiavwidget.cpp \
    antivirus/operationdelegate.cpp \
    antivirus/resultdelegate.cpp \
    antivirus/scanwidget.cpp \
    antivirus/suggestdelegate.cpp \
    antivirus/threatsoperationthread.cpp \
    antivirus/updatedialog.cpp \
    antivirus/usbscansettingdlg.cpp \
    antivirus/virusfiledetaildelegate.cpp \
    common/schedulescan/schedulescanview.cpp \
    common/schedulescan/schedulescanitem.cpp \
    common/schedulescan/schedulescandialog.cpp \
    common/scanwhitelist/scanwhitelist.cpp \
    cleaner/cleanerdbusadaptorimpl.cpp \
    cleaner/trashcleanwidget.cpp \
    cleaner/trashcleanitem.cpp \
    cleaner/cleanermodule.cpp \
    cleaner/widgets/cleaneritem.cpp \
    cleaner/widgets/cleanerresultitemwidget.cpp \
    common/usbmanagercomm.cpp \
    common/defenderprocinfo.cpp \
    common/defenderprocinfolist.cpp \
    common/systemsettings.cpp \
    common/hpolicykithelper.cpp

HEADERS += \
        devcommon.h \
        devcommon_global.h \ 
    interface/moduleinterface.h \
    interface/frameproxyinterface.h \
    hconcurrent.h \
    comdata.h \
    cominfo.h \
    common.h \
    compixmap.h \
    gsettingkey.h \
    invokers/invokerfactory.h \
    invokers/invokerinterface.h \
    invokers/deepindefendersettingsInvoker.h \
    invokers/dbusinvoker.h \
    antivirus/antiviruswork.h \
    widgets/dialogmanage.h \
    widgets/ddialog.h \
    widgets/dspinner.h \
    widgets/dialog_constants.h \
    csingleteon.h \
    dtrashmanager.h \
    widgets/dlistviewmulticol/dlistviewmulticolframe.h \
    widgets/dlistviewmulticol/dlistviewmulticoldelegate.h \
    widgets/dlistviewmulticol/dlistviewmulticolcommon.h \
    widgets/dlistviewmulticol/dlistviewmulticol.h \
    widgets/searchlineedit/searchlineedit.h \
    widgets/searchlineedit/animatedlineedit.h \
    widgets/labels/tipslabel.h \
    widgets/labels/smalllabel.h \
    widgets/labels/normallabel.h \
    widgets/labels/largelabel.h \
    widgets/avcpulimitation.h \
    widgets/basiclistdelegate.h \
    widgets/basiclistmodel.h \
    widgets/custompushbutton.h \
    widgets/dccslider.h \
    widgets/dccsliderannotated.h \
    widgets/defendertable.h \
    widgets/defendertableheaderview.h \
#    widgets/fixitemwindow.h \
    widgets/hframe1.h \
    widgets/menuitem.h \
    widgets/multicombox.h \
    widgets/multiselectlistview.h \
    widgets/passwordedit.h \
    widgets/safetyprotectionitem.h \
    widgets/scansize.h \
    widgets/scorebar.h \
    widgets/scoreprogressbar.h \
    widgets/securitylevelitem.h \
    widgets/selectediconwidget.h \
    widgets/settingsgroup.h \
    widgets/settingsheaderitem.h \
    widgets/settingsitem.h \
    widgets/switchwidget.h \
    widgets/tipwidget.h \
    widgets/titlebuttonitem.h \
    widgets/titledslideritem.h \
    widgets/titlelabel.h \
    widgets/translucentframe.h \
    widgets/updateaddressitem.h \
    widgets/usbstorageitemrefreshmodel.h \
    widgets/viruswhitelistscan.h \
    dversionnumber.h \
    widgets/dstyleoption.h \
    gui/kernel/dpalette.h \
    widgets/dlineedit.h \
    widgets/private/dlineedit_p.h \
    widgets/dalertcontrol.h \
    widgets/dlabel.h \
    widgets/hswitchbutton.h \
    widgets/hfloatingdialog.h \
    defenderinterface.h \
    widgets/hiconlistview.h \
    widgets/hiconitemview.h \
    widgets/hlistviewdelegate.h \
    widgets/dcommandlinkbutton.h \
    interface/modulesfactory.h \
    widgets/private/ddialog_p.h \
    widgets/private/dalertcontrol_p.h \
    widgets/private/dfloatingwidget_p.h \
    widgets/private/dspinbox_p.h \
    widgets/hfloatingmessage.h \
    util/dpinyin.h \
    antivirus/cominfo.h \
    antivirus/customfiledialog.h \
    antivirus/natiavisolationdilog.h \
    antivirus/natiavparentwidget.h \
    antivirus/natiavscanlog.h \
    antivirus/natiavtrustdialog.h \
    antivirus/natiavwidget.h \
    antivirus/operationdelegate.h \
    antivirus/resultdelegate.h \
    antivirus/scanwidget.h \
    antivirus/suggestdelegate.h \
    antivirus/threatsoperationthread.h \
    antivirus/updatedialog.h \
    antivirus/usbscansettingdlg.h \
    antivirus/virusfiledetaildefinition.h \
    antivirus/virusfiledetaildelegate.h \
    common/schedulescan/schedulescanview.h \
    common/schedulescan/schedulescanitem.h \
    common/schedulescan/schedulescandialog.h \
    common/scanwhitelist/scanwhitelist.h \
    cleaner/trashcleanwidget.h \
    cleaner/trashcleanitem.h \
    cleaner/cleanermodule.h \
    cleaner/cleanerdbusadaptorinterface.h \
    cleaner/cleanerdbusadaptorimpl.h \
    cleaner/widgets/cleanerresultitemwidget.h \
    cleaner/widgets/cleaneritem.h \
    common/usbmanagercomm.h \
    common/defenderprocinfo.h \
    common/defenderprocinfolist.h \
    common/systemsettings.h \
    common/hpolicykithelper.h

RESOURCES += \
    ../icons/defender_icons.qrc

RESOURCES += \
    res.qrc

PKGCONFIG += libfastjson
CONFIG += link_pkgconfig

unix:!macx: LIBS += -L $$OUT_PWD/../gsettings-qt4 -lgsettings-qt4

INCLUDEPATH += $$PWD/../gsettings-qt4
DEPENDPATH += $$PWD/../gsettings-qt4


unix:!macx: LIBS += -L$$OUT_PWD/../polkit-qt4/ -lpolkit-qt4

INCLUDEPATH += $$PWD/../polkit-qt4
DEPENDPATH += $$PWD/../polkit-qt4

unix {
    target.path =  $$[QT_INSTALL_LIBS]
    INSTALLS += target
}

dev_file1.files=$$PWD/*.h
dev_file1.path=/usr/include/deepin-defender-mil
dev_file2.files=$${PWD}/antivirus/*.h \
dev_file2.path=/usr/include/deepin-defender-mil/antivirus
dev_file3.files=$${PWD}/interface/*.h
dev_file3.path=/usr/include/deepin-defender-mil/interface
dev_file4.files=$${PWD}/invokers/*.h
dev_file4.path=/usr/include/deepin-defender-mil/invokers
dev_file5.files=$${PWD}/widgets/*.h
dev_file5.path=/usr/include/deepin-defender-mil/widgets
dev_file6.files=$${PWD}/widgets/dlistviewmulticol/*.h
dev_file6.path=/usr/include/deepin-defender-mil/widgets/dlistviewmulticol
dev_file7.files=$${PWD}/widgets/labels/*.h
dev_file7.path=/usr/include/deepin-defender-mil/widgets/labels
dev_file8.files=$${PWD}/widgets/searchlineedit/*.h
dev_file8.path=/usr/include/deepin-defender-mil/widgets/searchlineedit


pc_file.files=$$PWD/$${TARGET}.pc
pc_file.path=$$[QT_INSTALL_LIBS]/pkgconfig

INSTALLS += dev_file1 dev_file2 dev_file3 dev_file4 dev_file5 dev_file6 dev_file7 dev_file8 pc_file

TS_NAME = $${PWD}/../translations/$${TARGET}
exists($${TS_NAME}.ts) {
    LRELEASE_PATH = $$[QT_INSTALL_BINS]/lrelease
    QMAKE_PRE_LINK += $$LRELEASE_PATH $${TS_NAME}.ts -qm $${TS_NAME}.qm
    ts.files=$${TS_NAME}.qm
    ts.path=/usr/share/deepin-defender-mil/translations/
    INSTALLS += ts
}



